# import os
# from openai import OpenAI
#
# # python 3.7.1以上才可以
#
# client = OpenAI(
#     # 从环境变量中读取您的方舟API Key
#     api_key="739b36bf-8eb1-4bc6-bb84-93b8e4888136",
#     base_url="https://ark.cn-beijing.volces.com/api/v3",
#     # 深度推理模型耗费时间会较长，建议您设置一个较长的超时时间，推荐为30分钟
#     timeout=1800,
# )
#
#
# def get_completion(message):
#     try:
#         response = client.chat.completions.create(
#             model="deepseek-r1-250120",
#             messages=[
#                 {"role": "user", "content": f"{message}"}
#             ]
#         )
#     except Exception as e:
#         print(e)
#         return e
#     return response.choices[0].content
#
#
# # res = get_completion(None)
# # 当触发深度推理时，打印思维链内容
# # if hasattr(res.message, 'reasoning_content'):
# #     print(res.message.reasoning_content)
# # print(res.message.content)
